#ifndef CONFIG_H
#define CONFIG_H

#include <string>

// 设备和通道配置信息 - 使用常量方便管理
class Config {
private:
    // 单例实例
    static Config* instance;
    
    // 私有构造函数
    Config();
    
public:
    // 获取单例实例
    static Config& getInstance();

    // 设备相关配置
    const std::string DEVICE_ID = "34020000001320000002";  // 设备ID
    const std::string CHANNEL_ID = "34020000001320000003"; // 通道ID - 不同于设备ID
    const std::string DEVICE_NAME = "V5摄像头";
    const std::string MANUFACTURER = "V5";
    const std::string MODEL = "V5-Camera";
    const std::string FIRMWARE = "1.0.0";
    
    // SIP相关配置
    const std::string PASSWORD = "12345678";
    const std::string REALM = "4101050000";
    const std::string SERVER_IP = "47.120.9.38";
    const int SERVER_PORT = 8116;
    const std::string PUBLIC_IP = "47.120.9.38";
    const std::string SERVER_ID = "41010500002000000001";
    
    // 推流相关配置
    std::string stream_ip = "127.0.0.1";    // 推流目标IP
    int stream_port = 1935;                 // 推流目标端口
    std::string stream_transport = "TCP";   // 推流传输协议
    std::string stream_setup = "passive";   // 连接模式
    std::string stream_ssrc = "";           // SSRC流标识

    // 调试配置
    bool debug_mode = true;                 // 是否开启调试模式
    int log_level = 0;                      // 日志级别 (0=TRACE, 1=DEBUG, 2=INFO, 3=WARN, 4=ERROR, 5=FATAL)
    bool log_to_file = true;                // 是否记录日志到文件
    std::string log_file = "gb_client.log"; // 日志文件名

    // 设备和通道信息
    std::string getDeviceId() const;
    std::string getChannelId() const;
    std::string getDeviceName() const;
    std::string getManufacturer() const;
    std::string getModel() const;
    std::string getFirmware() const;
    
    // SIP账户信息
    std::string getPassword() const;
    std::string getRealm() const;
    
    // 服务器信息
    std::string getServerIp() const;
    int getServerPort() const;
    std::string getPublicIp() const;
    std::string getServerId() const;

private:
    // 禁止拷贝和赋值
    Config(const Config&) = delete;
    Config& operator=(const Config&) = delete;
};

#endif // CONFIG_H 